<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/resource/admin/css/admin.css" media="all" />
<link rel="stylesheet" type="text/css" href="/resource/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/resource/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/resource/lib/Hui-iconfont/1.0.9/iconfont.css" />
<script type="text/javascript" src="/resource/common/js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="/resource/admin/plugs/layer/layer.js"></script>
<script type="text/javascript" src="/resource/admin/plugs/laydate/laydate.js"></script>
<script src="/resource/admin/js/initialization.js" type="text/javascript" charset="utf-8"></script>
<!-- <script type="text/javascript" src="/resource/admin/js/detailed.js"></script> -->
<title>每日报表</title>
<style type="text/css">
.form-table th, .form-table td {
	border: 1px #eee solid;
	height: 30px;
	padding: 0 10px;
}
.form-table thead th {
	color: #555;
	font-weight: 600;
}
.form-table td:first-child {
	font-weight: 600;
	color: #666;
}
input,select,textarea {
	background-color: #fff;
	border-radius: 3px;
	border: 1px #ddd solid;
	height: 36px;
	max-width: 250px;
	padding: 0 10px;
}
.form-table td textarea {
	background-color: #fff;
	border-radius: 3px;
	border: 1px #ddd solid;
	height: 80px;
	min-width: 250px;
	padding: 0 10px;
}
.form-table td button,.form-table th button,.button {
	background: #1e9fff;
	height: 36px;
	padding: 5px 15px;
	border-radius: 4px;
	border: 0;
	color: #fff;
	font-weight: 600;
	font-size: 14px;
}
.form-table td span {
	margin-left: 10px;
	color: red;
}
.form-table tbody tr:hover {
	background-color: #f9f9f9;
}
</style>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i>首页
		<span class="c-gray en">&gt;</span>每日报表
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
			<i class="Hui-iconfont">&#xe68f;</i>
		</a>
	</nav>
	<div style="padding: 30px">
		<form id="searchform"  action="/admin/everyday/index" method="get">
			日期
			<input type="text" name="date_range" value="{if isset($where.date_range) and $where.date_range}{$where.date_range}{/if}" style="width:300px;" readonly>&nbsp;&nbsp;
			<input type="submit" value="搜索" class="button"/>
		</form>
		<div style="float:right; display:block; margin:20px 2px;">
		</div>
		<table width="100%" class="form-table">
			<thead>
				<tr>
					<th>时间</th>
					{if $data.adminType eq 2}
					<th>订单数量</th>
					<th>有效订单数</th>
					<th>成功率</th>
					<th>总流水</th>
					<th>手续费</th>
					{else /}
					<th>商户注册数</th>
					<th>有效订单数</th>
					<th>总流水</th>
					<th>个人收益</th>
					{/if}
				</tr>
			</thead>
			<tbody>
				{if $data}
				{foreach $data.data as $key=>$value }
				<tr>
					<td>{$value.date|date="Y-m-d"}</td>
					{if $data.adminType eq 2}
					<td>{$value.orderNumAll ?: 0}</td>
					<td>{$value.orderNum ?: 0}</td>
					<td>{$value.c_percent ?: 0} %</td>
					<td>{$value.details ?: 0}</td>
					<td>{$value.profit ?: 0}</td>
					{else /}
					<td>{$value.regNum ?: 0}</td>
					<td>{$value.orderNum ?: 0}</td>
					<td>{$value.details ?: 0}</td>
					<td>{$value.profit ?: 0}</td>
					{/if}
				</tr>
				{/foreach}
				<tr>
					<td>本页统计</td>
					{if $data.adminType eq 2}
					<td>{$data.totalPage.orderNumAll ?: 0}</td>
					<td>{$data.totalPage.orderNum ?: 0}</td>
					<td>{$data.totalPage.c_percent ?: 0} %</td>
					<td>{$data.totalPage.details ?: 0}</td>
					<td>{$data.totalPage.profit ?: 0}</td>
					{else /}
					<td>{$data.totalPage.regNum ?: 0}</td>
					<td>{$data.totalPage.orderNum ?: 0}</td>
					<td>{$data.totalPage.details ?: 0}</td>
					<td>{$data.totalPage.profit ?: 0}</td>
					{/if}
				</tr>
				<tr>
					<td>全部总计</td>
					{if $data.adminType eq 2}
					<td>{$data.totalAll.orderNumAll ?: 0}</td>
					<td>{$data.totalAll.orderNum ?: 0}</td>
					<td>{$data.totalAll.c_percent ?: 0} %</td>
					<td>{$data.totalAll.details ?: 0}</td>
					<td>{$data.totalAll.profit ?: 0}</td>
					{else /}
					<td>{$data.totalAll.regNum ?: 0}</td>
					<td>{$data.totalAll.orderNum ?: 0}</td>
					<td>{$data.totalAll.details ?: 0}</td>
					<td>{$data.totalAll.profit ?: 0}</td>
					{/if}
				</tr>
				{else /}
				<tr>
					<td colspan="{$data.adminType == 2 ? 6 : 5}" style="text-align: center;font-weight: normal;color: #999">暂无数据</td>
				</tr>
				{/if}				
			</tbody>
		</table>
		<div class="page">{if $data}{$data.page|raw}{/if}</div>
	</div>
</body>
</html>